#pragma once
#include "osgLib/TemplexTool.h"
#include "OsgRx/OfcepSingleton.h"
#include "DataBase/DBPublic.h"
#include "OsgRx/OcRxFactory.h"
#include "OsgRx/OcRxFactoryEnumerator.h"
#include "OsgRx/OcRxCreator.h"

#include "OsgRx/OcRxFactoryCreator.h"




enum EDbDrawableType
{
  EDBDT_Default         = 0,   
};
typedef unsigned long _DbDrawableType;


#ifndef _DataPoolType_
  #define _DataPoolType_
  typedef unsigned long _DWORD; 
  typedef _K_CompositeStruct2<_DWORD, _DWORD  > _DataPoolType;
#endif

typedef _K_CompositeStruct2<_DataPoolType/*SubType*/, _DbDrawableType/*MianType*/  > DbDrawableType;

//////////////////////////////////////////////////////////////////////////
#define RegistDrawableFactory(ClassData, ClassDrawable, DrawableType) \
class ClassData##ClassDrawable : public OcPgDrawableFactory \
{ \
public: \
  ClassData##ClassDrawable(void): \
      OcPgDrawableFactory(DbDrawableType(ClassData::m_sDataType, DrawableType)) \
      { \
        g_pDrawableCreator->RegisitFactory(mType, this); \
      } \
      virtual ~ClassData##ClassDrawable(void){;} \
      \
public: \
  virtual OcPgDrawable * Creat(void* pData) \
  { \
    return new ClassDrawable(pData); \
  } \
}; \

#include <DrawDataBase/Export>
#include "DrawDataBase/OcPgDrawable.h"
#include "DrawDataBase/OcPgDrawableFactory.h"
#include "DrawDataBase/OfcepDrawableCreator.h"